package craw;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.charset.Charset;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


public class CrawServlet extends HttpServlet {
	public void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws IOException {
		
		try {
			URL url = new URL("http://jpgoarticles.appspot.com/craw");
			
			BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream(), Charset.forName("utf-8")));
		} catch (Exception e) {
			// TODO: handle exception
		}
		try {
			URL url = new URL("http://esgoarticles.appspot.com/craw");
			
			BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream(), Charset.forName("utf-8")));
		} catch (Exception e) {
			// TODO: handle exception
		}
		try {
			URL url = new URL("http://ptgoarticles.appspot.com/craw");
			
			BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream(), Charset.forName("utf-8")));
		} catch (Exception e) {
			// TODO: handle exception
		}
		
	}
}
